from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

import sys

from selenium.webdriver.support.select import Select

sys.path.append(r'..')
from web_base.base_page import BasePage
from page_object.login_page import LoginPage

class SupplierPage(BasePage):
    url = r'/bsams/front/asset_provider/asset_provider_list.do'

    # 查询定位
    query_status_loc = (By.NAME, 'status')
    query_title_loc = (By.ID, 'title')
    query_btn_loc = (By.CLASS_NAME, 'search_button')

    def supplier_query(self, status, title):
        self.open()
        self.ele_select(self.query_status_loc, status)
        self.input_ele(self.query_title_loc, title)
        self.ele_click(self.query_btn_loc)
        sleep(3)
        text = self.get_alert_text()
        self.alert_click()
        return text



if __name__ == '__main__':
    pass